-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: clarify difference between workspace directory and terminal working directory #2418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: clarify difference between workspace directory and terminal working directory #2418
Conversation
…ing directory This commit addresses confusion between the VS Code workspace directory and terminal working directory. Roo was not properly distinguishing between these concepts, leading to issues when terminal commands changed directories. - Renamed 'Current Working Directory' to 'Current Workspace Directory' throughout - Added clearer notice when a command changes the working directory in a terminal - Added explanation about the difference between workspace and working directories - Updated all tool descriptions to reference 'workspace directory' References: https://www.reddit.com/r/RooCode/s/6L19EvsFbF Signed-off-by: Eric Wheeler <[email protected]>
Update terminology from 'working directory' to 'workspace directory' in tests to reflect VSCode's concept of workspace vs working directory. Signed-off-by: Eric Wheeler <[email protected]>
|
|
Something in me wants to name one of them something totally differently without the word "work" in both. I can just see the quantized LLM measuring the Levenshtein distance between the two paths and still getting it wrong :-) |
This PR solves existing an ongoing issues that affect many people. The reason that I chose the word "workspace" is because it is the term used by vs code, so it is likely to be part of training corpus. These changes seem to work well for the models that were tested, and I think we should get this merged to solve existing known problems (instead of deferring because of future unknown problems). Even for quantized models, this change will only improve the response. If naming uniqueness is not quite far enough apart, and you discover an actual specific issue then I think that should be handled as a second pull request. I am not dismissing your suggestion, I think it would be great to have inexpensive models work well inside of Roo, however in the sense of triage, this is more about stopping the bleeding and then dealing with nice-to-haves at another time. |
Context
All of these are system instruction or model feedback changes, no actual program changes:
This PR addresses confusion between the VS Code workspace directory and terminal working directory. Roo was not properly distinguishing between these concepts, leading to issues when terminal commands changed directories.
The problem occurs when users run commands that change directories (like 'cd') in a terminal. Roo would continue to reference the original workspace directory in subsequent commands, even though the terminal's working directory had changed. This led to commands failing because they were being executed in the wrong directory.
For example, as described in this Reddit post (https://www.reddit.com/r/RooCode/s/6L19EvsFbF), a user would:
The third command would fail because Roo didn't understand that the terminal was already in the 'aws-lambda/foo' directory after the second command. Roo would try to change directories again, resulting in an error.
Changes
This PR makes the following high-level changes:
Clarifies terminology by distinguishing between:
Improves user feedback when terminal directory changes occur
Enhances documentation to explain the difference between these concepts
How to Test
Found 1 test suites
.........
Ran 9 tests in 0.196 s
9 passing 0 failing 0 pending
3. When the test completes, simply tell Roo 'again'
4. Verify that Roo correctly understands it's already in the right directory and runs the test directly without trying to change directories again
5. This has been tested successfully on the following models:
Get in Touch
Discord: KJ7LNW
Important
Fixes terminal working directory handling in
Cline.tsand clarifies workspace vs. working directory terminology across multiple files.Cline.tsto correctly handle changes in terminal working directory and provide user feedback when directory changes occur.Cline.ts.multi-search-replace.ts,capabilities.ts,system-info.ts,insert-content.ts,list-files.ts,read-file.ts,search-and-replace.ts,search-files.ts, andwrite-to-file.ts.system-info.tsto explain the difference between workspace and working directories.This description was created by
for 4f17daf. It will automatically update as commits are pushed.